It appears that your login user has a bad login item or some other snafu that prevents login and safe mode.
Is your device backed up?
No, you can copy your data from single user mode or recovery mode to an external device. See below.
Create a new admin. Should be clean of problems with existing user. See below.
install a new copy of macOS on an external drive. The safest move. Before wiping [whipping] startup drive it's best to have two copies of your data.
Get the Mac to set up an additional administrative account.
This will work in all releases of Mac OS X so far.
You need to get into single use mode for steps one and two that are listed below. Start with your computer power off. Hold down command-s. Power on your computer. Continue holding down command-s until you see some text on the screen.
This page will give more details on how to get into single user mode.
http://support.apple.com/kb/HT1492
Type in the following:
The first two commands will depend on your release of Mac OS X. Look at what is typed out in the console to determine the exact format. You do not need to type in the lines beginning with an ampersand, #, they are comments.
# Type the follow two instructions to access the startup disk in read/write.
# Press return after each command.
# in case of partial success repeat this command until errors go away.
/sbin/fsck -fy
/sbin/mount -uw /
# Get setup to activate a new administration account
cd /var/db
pwd
#List all files. The l is a lower case L.
ls -a
# The move command acts as a rename command in this format.
# In Yosemite, this file is zero bytes.
# the disappearance of .AppleSetupDone causes a new administration account
# to be added the next reboot.
mv -i .AppleSetupDone .AppleSetupDone.old
# reboot your mac
shutdown -r now
recovering data in single user mode or recovery mode.
Be careful to got the correct path in recovery mode. Your files will not be in /
see:
backing up from the command line via single user mode.
https://discussions.apple.com/message/32357328#32357328
You may try to recover your data by booting up in recover mode command+r then using the terminal.
You can copy files on the Unix command line interface if you placed the flash drive the USB port before powering on your machine.
1) you best have the flash drive formatted for the Mac. See disk utility. It's on the pull down.
2) Power off the the machine. Hold down the command+r keys then power on your machine.
3) After you specify the language you will come to the installation panel.
4) Do not install.
5) Go to the top of the screen and click on the tools menu item.
6) Click on Terminal to use the command line interface.
7) You can copy files on the Unix command line interface if you placed the flash drive in a USB port before powering on your machine.
ditto -X -rsrc /SSD/users/rastefatah/Desktop/Outlook Festival 2017 RAW files/* /Volumes/thumb
You will note that the path contains spaces. You need to escape all spaces.You need to put quotes around all file names with a space in them. I'm not so sure about the asterisk [ * ]. I think you need to do:
ditto -X -rsrc "/SSD/users/rastefatah/Desktop/Outlook Festival 2017 RAW files" /Volumes/thumb
the ditto command copies over a directory / folder at a time
You should verify that the files have been copied correctly by trying them in another Mac before it the deleting the original.
Here is an overview of the commands.
https://discussions.apple.com/docs/DOC-11071