Switched to master branch, can't login (desperately seeking advice)

I have been on develop for a while, but do to recent changes, I need to revert to the master. I’ve tried on two servers already, from a fresh install via the production script, and by the time I restore my DB, it won’t let me login.

Using the right credentials, chrome shows

jquery.min.js:4 POST http://64.137.206.63/ 500 (INTERNAL SERVER ERROR)send @ jquery.min.js:4ajax @ jquery.min.js:4login.call @ login?redirect-to=/desk:401(anonymous function) @ login?redirect-to=/desk:342dispatch @ jquery.min.js:3r.handle @ jquery.min.js:3

The screen goes white temporarily as during usual page transition, but puts me back at the same screen after the error.

I’m pretty desperate to get ERPNext going again for my company. Could I ask anybody for help on this?