adds tokens for login session persistence.
adds error messages to login
resolves merge conflicts