implementation of /login and /debug/login routes
Merge remote-tracking branch 'origin/master'