Added register capability to login endpoint