LoginFunc

added login functionality