Added login functionality on the backend