Add test for gen and retrieving user credentials