Properly implemented login process (backend)