login error codes

changed from boolean login result to int error codes