added off-line mode functioanlity and better user login retVals