added username and pw check