Fixed login to go to appropriate page