Moved code around

Login not working