Authenticate user, refactor sign in page