Working `sign_in` with cookies