Efficient user authentication and key establishment protocols for wireless sensor networks and internet of things