Register form and logged in user dropdown

Also refactored index.php