Added Login and Logout functions and moved base.html