Added groups/privileges validation, moved utility functions into separate file, added home page redirect view