Add Login and logout function