Refactoring

separating and moving logic into two functions: login_page() and
note_test()