Logging in and authentication by token