refactoring LoginPanel