login ,register and logout