Added user login and registration functionality. Fixed a minor UX bug at the end.