After unlocking apple id and sign in to iTunes I cannot unlock my iPhone I have got a second hand iPhone (5s) of my friend and it has been restored before and now has hello on the screen. 

i get his Apple ID and password for that. My friend his self has iPhone 6 with the same Apple id and password and it is turn on and on line. So I connected the iPhone (5s) to iTunes for restoring again iPhone. Then iTunes asked me for applied and password. After entering applied and password, iTunes told me this applied  has been disabled and you have to reset password so I reset the password and ask my friend to check his email for verify and he did that and applied unlocked.

Now I sign in to iTunes with verified applied and password and click on my iPhone in iTunes. iTunes again says enter applied and password? I entered verified applied and password. Now again it says “you cannot unlock iPhone with m…@gmail.com.  Also I sign in to i cloud.com and in find my iPhone I can see just my    friend mobile Please help what is the problem? After unlocking applied and sign in to iTunes I cannot unlock my iPhone.  Please how can I solve this problem and unlock my iPhone, Apple id and password of my friend does not have problem because I can sign in to iTunes and I cloud from computer.
This is what it looks like when your iOS device is activation locked.

Bypassing it is practically impossible unless you are the original purchaser.


How can I bypass Activation Lock?


See that thread for how to get a hold of Apple's support, but basically you either need to re-enter the locking user account and password or you need the person that controls that account to log in themselves to http://icloud.apple.com and remove the lock against this hardware.


Regain control of the account that was used before to lock the iPhone
Unlock that device with that previous account
Activate the iPhone with your account to lock it to yours