login api takes another parameter: did the login succeed or fail