Not providing credentials returns 500, Internal Server Error, should be:

```ruby
    if !request.authorization && current_user
      return true
    else
      if request.authorization
         params[:auth_username], params[:auth_password] = user_name_and_password(request)
      end
      authenticate! :scope => :api
      params.delete('auth_username')
      params.delete('auth_password')
    end
```