added login functionality to base script