Refactored Menu

Added empty fields validation on login & refactored the jgetpage
function so the menu is formed in a different function in a different
page.