How to open current page in perspective using own login when click on button

Hi guys,

I'm trying to open the current page when I login button is clicked using the below script and idea what is wrong from my end.

Using the below script login successfully but open the home page.