Updated backend login to function just like front end.