edited authenticate