Fix session for the power resetore test suite

Change-Id: I0872f976d3cddff11fd189b04ff878a6ec0761a3
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/redfish/extended/test_power_restore.robot b/redfish/extended/test_power_restore.robot
index 4639400..8107cdb 100644
--- a/redfish/extended/test_power_restore.robot
+++ b/redfish/extended/test_power_restore.robot
@@ -148,14 +148,14 @@
     # Description of argument(s):
     # expectedState    Test initial host state.
 
+    Redfish.Login
+
     Run Keyword If  '${expectedState}' == 'Running'
     ...  Redfish Power On  stack_mode=skip
 
     Run Keyword If  '${expectedState}' == 'Off'
     ...  Redfish Power Off  stack_mode=skip
 
-    Redfish.Login
-
 
 Test Teardown Execution
     [Documentation]  Do the post test teardown.
@@ -164,7 +164,6 @@
 
     FFDC On Test Case Fail
     Close All Connections
-    Redfish.Login
 
 
 Suite Teardown Execution