Creating a page with user authentication from scratch