roughly implemented user authentication, registration still needs work