I have 2 site ie sub.mydomain.com and mydomain.com.
When a user logs in into mydomain.com and if the credentials are of subdomain then the user should be logged in in