Slim and refine logging a user in and registration.