added error codes and changed the login response to have role