refactored login, added menuitems