improved login page, fixed bugs in logic for settings page