fixed errors
Added policy for safety
fixed the findByUsername