def authenticated_user(func):
    """
    Decorator for UserGenesetHandler operations.
    Ends request of user is not logged in.
    """
    def _(self, *args, **kwargs):

        if not self.current_user:
            self.send_error(
                message='You must log in first.',
                status_code=401)
            return
        return func(self, *args, **kwargs)
    return _