Moved SWDF_validate_user_session().

Function moved from ip.php to users.php as it's a more suitable location
for it.