changed login backend functionality