Made changes to user authentication to work with postgres backend.