add function for login, logout and menu