implementing login function with ip check
implementing login function with ip check