changes to login and middle