basic implementation of authentication method
added sample for login