add user auth implementation code
add junit tests for user auth code