Refactored logout
Updated user registration