Refactored navigation menu code; clicking form buttons in nav menu now hides the menu on success