remove initial object and refactor login controller