views/users: Added /generate_keys route
flask: Fixed PEP8 issues