- implemented authentication functionality