added login and registration function to main page