Fully working login, with new page if login is successful