extracts usercredentials class from session class; uses intellij's .equals and .hashcode generators