Macbook restarts when logging in My Macbook Pro (Mid-2015, Mojave) restarts after I type my password to log in. 
The progress bar fills to about three-quarters before this happens. 

I have tried:


Resetting PRAM
Resetting SMC
Running Diagnostics (holding 'd' on startup) [only says battery not at peak capacity]
Running fsck in single-user mode (cmd-s on startup) [all ok]
Booting into recovery mode (cmd-r on startup) - causes macbook to go into infinite boot loop. Mac logo appears, then immediately reboots. 
Booting into safe mode - login bar fills all the way, then macbook restarts. 


Does anyone have any further ideas of what I could try? Thanks!!
Try discharging the battery (plug in an iPhone or iPad or whatever and drain the battery by charging it). Then reset the PRAM and SMC. Finally start up in verbose mode (hold V while booting) and try to capture what gets displayed (iPhone or iPad video works well).

After the battery has been effectively dead for a day (it should be dead enough that when you hit the power button it only shows a "plug in charger" pictogram, give it a little charge and there's a good chance your Mac will act properly. If not, the verbose console log will be useful.