finished login and registration