title: angular laravel unauthorized 401 error
body: <p>Okay, I don't know what I am doing wrong, but I really tried everything.
  In agular I just send user data to sign up</p>
  
  <pre><code>signUp(userData: LoginData) {
      return this.http.post(`${this.rootPath}api/signup`, userData);
    }
  </code></pre>
  
  <p>On backend</p>
  
  <pre><code>public function login()
      {
          $credentials = request(['email', 'password']);
  
          if (! $token = auth()-&gt;attempt($credentials)) {
              return response()-&gt;json(['error' =&gt; 'Email or password doesn\'t exist'],
                  401);
          }
  
          return $this-&gt;respondWithToken($token);
      }
  
      public function signup(signUp $request)
      {
          User::create($request-&gt;all());
          return $this-&gt;login();
      }
  </code></pre>
  
  <p>signUp</p>
  
  <pre><code>public function authorize()
      {
          return true;
      }
  
      public function rules()
      {
          return [
              'name' =&gt; 'required',
              'email' =&gt; 'required|email|unique:users',
              'password' =&gt; 'required'
          ];
      }
  </code></pre>
  
  <p>It adds new user to database, but I ALWAYS get 401 error which says user is not authorized. It is strange and I can't unerstand what am I doing wrong...
  Field REMEMBER_TOKEN is null, but I think it is not the problem...</p>