added functions for passwordhashing and login