login, sessions and new error handling