How to disable picture button after click?
The link needs a slash in front of it:

/user/login

instead of:

user/login

Logout would be:

/user/logout

You need to use relative paths or you will continue encountering this behavior. A better way would be to send the variables to your template(s) via the appropriate preprocess function, and use the l() function to create links.