Inplemented user authentication