Completed version for Login and Profile page