Rebuild Login/Logout in view.py