further code cleanup and bug fixes
Fix error when no username or password is entered during login