def authenticate
      if @user = User.authenticate(params[:email], params[:password])
        render json: {message: @user, success: true}, status: 200
      else
        render json: {message: "Authentication failed", success: false}, status: :ok
      end
    end
def authenticate
      if @user = User.authenticate(params[:email], params[:password])
        render json: {message: @user, success: true}, status: 200
      else
        render json: {message: "Authentication failed", success: false}, status: :ok
      end
    end
POST /authenticate
 params: email, password