Updating Login and Logout functions for the frontend site