fix missing user credentials bug in photo creation