Logging in get rearranged