Different ways of logging in a user without having them to type anything?
You just need to use drupal_session_regenerate(), you can see the use of this function here. All you have to do is either play with Uid or if you want to do this for anonymous user then you just create a user xyz and use that ID for session regenerate. You can grab the UID from URL for different users like www.example.com/custom-url-to-login/125 or www.example.com/custom-url-to-login?uid=125

now supposing 125 be the ID of user whom you want to login on visiting the URL.

The code will go something like this:

global $user;
$user = user_load(540); // suppose 540 be UID of xyz account
drupal_session_regenerate();


This is just a suggestion, if it does not work for you please let me the know the correct solution. 

Thanks