Hello,
    I have a issue that we have a sitecollection with different subsites. Each subsite describes different departments in the company. Suppose Hr department people logged in directly opens the HR subsite in sitecollection. How can change the site based on logged user? Can anyone please help me how to do this?
This can be by adding redirect logic in the homepage using jquery.
1) create SharePoint groups for each department and add respective users
2) Add a script link webpart in the home page
3) Using SPServices JQuery library, validate the user with the sharepoint group and add a redirect logic to the required department subsite