added if else block for changes in login