[bugfix][xs]: set currentUser on res.locals properly (not just in test mode).
[#261,user][m]: if user db is configured user info is now stored to db on login - fixes #261.