made login/logout work on the frontend