really fixed the login bug this time
seperated account functions to a module